using System.ComponentModel.DataAnnotations;

namespace AiQiuQuan.Sport.Model.Models
{
    /// <summary>
    /// 新增比赛小组成员dto
    /// </summary>
    public class GameGroupUserAddDto
    {
        /// <summary>
        /// 比赛ID
        /// </summary>
        [Required(ErrorMessage = "比赛ID必填")]
        public Guid GameId { get; set; }

        /// <summary>
        /// 对阵类型，1单打、2双打、3男单、4女单、5男双、6女双、7混双
        /// </summary>
        [Required(ErrorMessage = "对阵类型，1单打、2双打、3男单、4女单、5男双、6女双、7混双必填")]
        public int VersusType { get; set; }

        /// <summary>
        /// 组ID
        /// </summary>
        [Required(ErrorMessage = "组ID必填")]
        public Guid GroupId { get; set; }

        /// <summary>
        /// 组序号
        /// </summary>
        [Required(ErrorMessage = "组序号必填")]
        public int GroupNo { get; set; }

        /// <summary>
        /// 队伍序号
        /// </summary>
        [Required(AllowEmptyStrings = false, ErrorMessage = "队伍序号必填")]
        [StringLength(5, ErrorMessage = "队伍序号不能超过5个字符")]
        public string TeamNo { get; set; }

        /// <summary>
        /// 用户成员1ID
        /// </summary>
        public Guid? User1Id { get; set; }

        /// <summary>
        /// 用户成员2ID,单打为null
        /// </summary>
        public Guid? User2Id { get; set; }

        /// <summary>
        /// 得分
        /// </summary>
        [Required(ErrorMessage = "得分必填")]
        public int Score { get; set; }

        /// <summary>
        /// 排名
        /// </summary>
        [Required(ErrorMessage = "排名必填")]
        public int Rank { get; set; }
    }
}
